//
//  MTUserApiManager.h
//  MeToo
//
//  Created by 俊松何 on 2018/7/5.
//  Copyright © 2018年 tianxie. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MTHttpTool.h"
#import "MTUserModel.h"
#import "UserAuthenticationinfo.h"
#import "MTLiveUserInfo.h"
#import "MTUserLiveTotalModel.h"
#import "MTUserTotalModel.h"

@interface MTUserApiManager : NSObject

+(MTUserApiManager *)manager;

/**
 获取注册的验证码

 @param phone 手机号
 @param countryCode 地区编码
 @param completionBlock 完成block
 */
-(void)getregisterVerCode:(NSString *)phone
              countryCode:(NSString *)countryCode
               completion:(void (^)(MTError *mterror))completionBlock;

/**
 用户登录

 @param phone 登录手机号
 @param password 密码
 @param completionBlock 完成block
 */
-(void)loginWithphone:(NSString *)phone
             password:(NSString *)password
          countryCode:(NSString *)countryCode
           completion:(void (^)(MTUserModel* user, MTError *mterror))completionBlock;

/**
 用户注册

 @param phone 手机号
 @param countryCode 地区编码
 @param verifyCode 验证码
 @param type 注册类型 ，手机 ，三方
 @param avatar 头像
 @param name 名字
 @param password 密码
 @param gender 性别
 @param completionBlock 完成block
 */
-(void)registerUser:(NSString *)phone
        countryCode:(NSString *)countryCode
         verifyCode:(NSString *)verifyCode
               type:(NSString *)type
             avatar:(NSString *)avatar
               name:(NSString *)name
           password:(NSString *)password
             gender:(NSString *)gender
         completion:(void (^)(MTUserModel* user, MTError *mterror))completionBlock;


/**
 更新头像

 @param avatar 头像url
 @param completionBlock 完成block
 */
-(void)updateAvatar:(NSString *)avatar
         completion:(void (^)(MTError *mterror))completionBlock;

/**
 获取对应userId的info

 @param userId id
 @param completionBlock 完成block
 */
-(void)getUserInfo:(NSString *)userId
        completion:(void (^)(MTUserModel* user, MTError *mterror))completionBlock;



/**
 关注或者取消关注user

 @param userId userId
 @param completionBlock 完成block
 */
-(void)followUserWithUserId:(NSString *)userId
                 completion:(void (^)(MTError *mterror))completionBlock;

/**
 关注或者取消关注user
 
 @param userId userId
@param  follow follow
 @param completionBlock 完成block
 */
-(void)followUserV2WithUserId:(NSString *)userId
                       follow:(BOOL)follow
                 completion:(void (^)(MTError *mterror))completionBlock;


/**
 获取未读消息数量

 @param completionBlock 完成
 */
-(void)getCurrentDynamicCount:(void (^)(int count, MTError *mterror))completionBlock;


///user/get_authentication_info

/**
 获取用户认证信息

 @param completionBlock block
 */
-(void)getUserAuthenticationinfoWithcompletion:(void (^)(UserAuthenticationinfo* info, MTError *mterror))completionBlock;


/**
 获取黑名单列表
 
 @param completionBlock 完成block
 */
-(void)getBlackUserListPage:(int)page
               masterUserId:(NSString *)masterUserId
                 complation:(void (^)(MTUserLiveTotalModel *totalModel, MTError *mterror))completionBlock;


/**
 获取禁言列表
 
 @param completionBlock 完成block
 */
-(void)getnoSpeakUserListPage:(int)page
                 masterUserId:(NSString *)masterUserId
                   complation:(void (^)(MTUserLiveTotalModel *totalModel, MTError *mterror))completionBlock;


/**
 获取管理员列表
 
 @param completionBlock 完成block
 */
-(void)getMamgerUserList:(void (^)(NSMutableArray<LTUser *>*managerUsers, MTError *mterror))completionBlock;


/**
 主播添加直播间的管理员
 
 @param controlUserId 目标用户id
 @param completionBlock 完成block
 */
-(void)addLiveRoomManager:(NSString *)controlUserId
               completion:(void (^)(MTError *mterror))completionBlock;

/**
 删除禁言
 
 @param targetUserId 目标userid
 @param completionBlock 完成block
 */
-(void)deleteNoSpeaktargetUserId:(NSString *)targetUserId
                    masterUserId:(NSString *)masterUserId
                      completion:(void (^)(MTError *mterror))completionBlock;

/**
 删除管理员
 
 @param targetUserId 目标userid
 @param completionBlock 完成block
 */
-(void)deleteLiveRoomManagertargetUserId:(NSString *)targetUserId
                              completion:(void (^)(MTError *mterror))completionBlock;


/**
 删除黑名单用户
 
 @param targetUserId 目标userId
 @param masterUserId 主播UserId
 @param completionBlock 完成block
 */
-(void)deleteBlackUsertargetUserId:(NSString *)targetUserId
                      masterUserId:(NSString *)masterUserId
                        completion:(void (^)(MTError *mterror))completionBlock;

/**
 获取直播间的user信息

 @param masterUserId 主播userId
 @param targetUserId 目标userid
 @param completionBlock 完成block
 */
-(void)getUserOperInfoMasterUserId:(NSString *)masterUserId
                      targetUserId:(NSString *)targetUserId
                        completion:(void (^)(MTLiveUserInfo *user,MTError *mterror))completionBlock;



/**
 获取自己在该主播直播间的状态

 @param masterUserId 主播id
 @param completionBlock 完成block
 */
-(void)getSelfLiveStatusMasterUserId:(NSString *)masterUserId
                          completion:(void (^)(MTUserModel *user, MTError *mterror))completionBlock;





/**
 搜索用户添加管理员

 @param key 关键字
 @param page 页数
 @param completionBlock 完成block
 */
-(void)searchUserWithKeyWord:(NSString *)key
                        page:(int)page
                  completion:(void (^)(MTUserTotalModel *totalUser, MTError *mterror))completionBlock;

@end
